package casa.depesos.app.com.http.req;

import android.text.TextUtils;

import java.util.Map;

import casa.depesos.app.com.http.HttpReq;
import casa.depesos.app.com.http.ReqCallback;
import casa.depesos.app.com.http.bean.OrderBean;
import casa.depesos.app.com.http.parser.OrderParser;

public class OrdersReq implements HttpReq<OrderBean> {

    String status;

    public OrdersReq(String status) {
        this.status = status;
    }

    @Override
    public void req(ReqCallback<OrderBean> callback) {//   /app/loan/queryLoans
        req("/app/financial/fetchClientLoans", new OrderParser(), callback);
    }

    @Override
    public Map getBody() {
        Map map = HttpReq.super.getBody();
        if (!TextUtils.isEmpty(status)) {
            map.put("stattus", status);
        }
        return map;
    }
}
